package com.nc.delivery_project.server.domain;

/**
 * Created by miroshnik on 01.12.14.
 */
public class Country {
	  
	private int countryId;

	private String countryTitle;

	public Country() {
		
	}

	public Country(int countryId, String countryTitle) {
		super();
		this.countryId = countryId;
		this.countryTitle = countryTitle;
	}

	
	public Country(int countryId) {
		 this.countryId = countryId;
	}

	public int getCountryId() {
		return countryId;
	}

	public void setCountryId(int countryId) {
		this.countryId = countryId;
	}

	public String getCountryTitle() {
		return countryTitle;
	}

	public void setCountryTitle(String countryTitle) {
		this.countryTitle = countryTitle;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + countryId;
		result = prime * result
				+ ((countryTitle == null) ? 0 : countryTitle.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (!(obj instanceof Country))	return false;
		
		Country country = (Country) obj;
		
		if(countryTitle != null? countryTitle.equals(country.countryTitle) :country.countryTitle != null) return false;
				
		return true;
	}

	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder("Country{");
        sb.append("countryId=").append(countryId);
        sb.append(", countryTitle='").append(countryTitle);
        sb.append('}');
        return sb.toString();
	
	}

	
}
